/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




// Import mixins + colors
@import "standards";
@import "colors";

// Font awesome Pseudo classes
@import "font-awesome";
@import "x2-icons";

// Icon mixins and font
@import "icons";


body {
    margin: 0;
    padding: 0;
    font: normal 10pt Arial, Helvetica, sans-serif;
    color: #555555;
    /* background: url(background2.gif) top left repeat-x #000; */
    &.login {
        position: absolute;
        height: 100%;
        width: 100%;
        background: #fff;
        /* background: url(../images/login_white_bg.png) repeat-x left center; */
    }
}

/***********************************************************************
General Table Rules
***********************************************************************/

table {
    width: 100%;
    margin-bottom: 0.5em;
    border-collapse: separate;
    border-spacing: 0;
    vertical-align: middle;
}

th, td {
    vertical-align: middle;
}

caption, th, td {
    text-align: left;
    font-size: 12px;
    font-weight: normal;
    float: none !important;
}

/* div, span, a {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
} */

/* for IE and Opera: unselectable="on" */

/* span.x2-hint {
        text-decoration: none;
        font-size: 12px;
        color: #666;
        cursor: pointer;
}

span.x2-hint:hover {
        color: #999;
} */

ul.filter-hint {
    list-style-type: none;
    margin: 0;
    padding: 0 0 0 10px;
    li {
        margin: 0;
        padding: 0;
    }
    b {
        display: inline-block;
        width: 20px;
    }
}

/* #content {
        padding: 0 45px 20px 45px;
}     create padding for pages without column2.php layout  */

.span-15 #content {
    padding: 0;
}

.span-20 {
    #content {
        padding: 0;
    }
    &#content-box {
        width: 780px;
    }
}

/* blueprint doesn't create any margin for the last span */

#dashSIDE {
    position: relative;
    height: 400px;
    margin-left: -80px;
}

#recent-items > .portlet-content {
    max-height: 203px;
    overflow: hidden;
    &:hover {
        overflow-y: scroll;
        overflow-x: hidden;
    }
    
}

#actions .portlet-content, #recent-items .portlet-content, #top-contacts .portlet-content {
    padding: 0 0 5px 0;
}

#actions li, #recent-items li, #top-contacts li {
    margin: 0;
}

#actions a, #recent-items .portlet-content a, #top-contacts .portlet-content a, #actions li > span, #recent-items span, #top-contacts span {
    display: block;
    padding: 5px 10px;
    font-weight: normal;
    text-decoration: none;
}

#actions a:link, #recent-items .portlet-content a:link, #top-contacts .portlet-content a:link, #actions a:visited, #recent-items .portlet-content a:visited, #top-contacts .portlet-content a:visited {
    background: transparent;
    color: #555555;
}

#actions .portlet-content a:hover, #recent-items .portlet-content a:hover, #actions span, #recent-items span, #top-contacts span, #actions a:active, #recent-items .portlet-content a:active {
    background: $lightBabyBlue;
}

#recent-items .portlet-content a, #top-contacts .portlet-content a {
    text-decoration: none;
    font-size: 12px;
}

#recent-items .portlet-content a strong {
    font-size: 12px;
}

#top-contacts li {
    position: relative;
    .delete-link {
        display: none;
        width: auto;
        padding: 0;
        color: inherit;
        float: right;
        background: none;
        position: absolute;
        right: 5px;
        top: 0;
        bottom: 0;
        height: 11px;
        margin: auto;
        i {
            @include iconButton;
        }
    }
    &:hover {
        .delete-link {
            display: block;
        }
    }
}

#top-contacts .portlet-content a {
    strong {
        font-size: 12px;
    }
}

#recent-items .portlet-content {
    word-wrap: break-word;
}

/* Widgets */

div.blah {
    height: 850px;
}

#dashboard-grid {
    width: 1000px;
    height: 700px;
    margin-top: 40px;
}

.itemsColumn2 {
    float: left;
    width: 37.5em;
    padding-top: 1em;
    padding-bottom: 1em;
}

.itemsColumn3 {
    float: left;
    width: 24.5em;
    padding-top: 1em;
    padding-bottom: 1em;
}

.itemsColumn4 {
    float: left;
    width: 18.5em;
    padding-top: 1em;
    padding-bottom: 1em;
}

div.portlet-minimize {
    height: 13px;
    float: right;
    font-size: 12px;
    font-weight: normal;
    a {
        text-decoration: none;
    }
}

/* div.portlet-minimize .close-widget {
        background: url(../images/icons/Close_Widget.png) center center no-repeat;
} */

.left-widget-min-max {
    height: 5px;
    padding: 0 !important;
    padding-right: 5px !important;
    padding-top: 4px !important;

    width: 15px;
    display: inline-block;
    cursor: pointer;
    opacity: 0.7;

    &:hover {
        opacity: 1;
    }
}

.portlet-minimize .expand-widget,
.portlet-close-button,
.activity-control-link, 
.left-widget-min-max{
    opacity: 0.7;
}

.portlet-minimize {
    .collapse-widget {
        opacity: 0.7;
    }
    .portlet-close-button:hover,
    .expand-widget:hover {
        opacity: 0.7;
    }
}

.portlet-close-button {
    margin-right: 5px;
}

.portlet-close-button > :hover, .activity-control-link > :hover, .left-widget-min-max > :hover {
    opacity: 1;
}

.portlet-minimize {
    & a {
        color: inherit;
    }


    .collapse-widget {
        &:hover {
            opacity: 0.9;
        }
        position: relative;
        top: -3px;
        margin-right: 8px;
        /* background: url(../images/icons/Collapse_Widget.png) center center no-repeat; */
    }
    .expand-widget {
        margin-right: 10px;
        /* background: url(../images/icons/Expand_Widget.png) center center no-repeat; */
    }
}


/*********************************
* Right Widget CSS
********************************/
@import "partials/rightWidgets";


div.shown {
    margin-left: 10px;
    border: 1px solid black;
    width: 130px;
    padding-top: 3px;
    padding-left: 5px;
    padding-right: 5px;
    text-align: center;
    background: #fff;
}

p.descrip {
    font-weight: bold;
}

#actionLS {
    padding: 5px 15px 5px 15px;
}

/* #action-form textarea {
        width: 558px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
} */

.history {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    margin-left: 0px;

    .text-area-wrapper {
        margin: 0;
        padding: 2px 4px;
    }
    #save-publisher {
        width: 70px;
        text-align: center;
        float: right;
        margin: 0;
    }
    .publisher-tabs {
        padding: 5px;
        margin: 5px 0 0 0;
        background: #fff;
        @include border-radius(4px 4px 0 0);
    }

    .action-history-controls {
        border: none;
    }

    .list-view .items {
        border-left: none;
        border-right: none;
        border-bottom: none;
        @include border-radius(0 0 4px 4px);
    }

    .action-history-controls {
        @include border-radius(4px 4px 0 0 !important); 
        margin-bottom: -2px !important;
        border: none !important;
        // border: 1px solid #c5c5c5 !important;
    }

    .history .pager {
        @include border-radius(0 0 4px 4px !important); 
        border: 1px solid #c5c5c5 !important;
        margin-top: -3px !important;
    }
}


.ui-widget-content {
    /* background: none; */
}

.list-view {

    h2, h3, h4 {
        display: inline;
        margin-bottom: 0;
    }
    .items {
        clear: both;
        background: #fff;
        @include border-radius(4px);
        border: 1px solid #ccc;

    }
    .empty {
        margin: 0 0 5px 5px;
        display: block;
    }
    .comment-age {
        color: #666;
    }
    .summary {
        color: #555;
        display: inline;
        float: right;
    }
    .view {
        clear: both;
        padding: 0;
        width: auto;
    }
    a {
        text-decoration: none;
    }
    a:hover {
        color: #3d70b4;
    }
    
    .view.top-level {
        //border-top: 1px solid #F5F5F5;
        padding: 2px 5px 10px 5px;
        &.date-break {
            text-align: center;
            font-weight: bold;
            background-color: #eee;
            padding: 2px 5px 5px 5px;
        }
        .list-view {
            margin: 0 -5px;
            padding: 0;
            border: none;
            @include border-radius(0);
        }
        form {
            margin-top: 5px;
        }
        .view {
            background: white;
            margin: 0;
            padding: 2px 5px 2px 20px;
            border: solid #F5F5F5;
            border-width: 1px 0 0 0;
            
            @include border-radius(0);
        }
        &:first-child {
            border-top: none;
        }
    }
    .deleteButton {
        float: right;
    }
    .pager {
        margin: 5px 0 5px 0;
        text-align: right;
        border: 1px solid #ccc;
        padding: 5px;
        background: #fff;
        margin: 5px 0 0 0;
        text-align: right;
        @include border-radius(4px 4px 4px 4px);
    }
}

.event-text-box {
    margin-left: 50px;
}



.drive-icon {
    display: inline-block;
    height: 16px;
    width: 16px;
}

div.loading-icon, 
{
    background: url(../images/loading.gif) no-repeat;
    height: 32px;
    width: 32px;
}

.action-description, a.action-description {
    text-decoration: none;
    color: black;
}


.dashSubmit {
    float: right;
}



/**
 * These have been replaced by icons in-layout
 */
div.control-button {
    &.icon {
        &.complete-button {
            background: url('../images/icons/Complete.png') no-repeat center center;
            height: 17px;
            width: 22px;
        }
        &.uncomplete-button {
            background: url('../images/icons/Uncomplete.png') no-repeat center center;
            height: 17px;
            width: 22px;
        }
        &.edit-button {
            background: url('../images/icons/Edit.png') no-repeat center center;
            height: 17px;
            width: 22px;
        }
        &.delete-button {
            background: url('../images/icons/Delete1.png') no-repeat center center;
            height: 21px;
            width: 21px;
        }
    }
    &.sticky-button {
        background: url('../images/Unsticky1.png') no-repeat center center;
        height: 21px;
        width: 22px;
        &.unsticky {
            background: url('../images/Sticky1.png') no-repeat center center;
            height: 21px;
            width: 22px;
        }
    }
}

div.sticky-icon {
    float: right;
    background: url('../images/Sticky1.png') no-repeat center center;
    height: 21px;
    width: 22px;
    margin-top: 10px;
    margin-right: 10px;
}



div.list-actions {
    float: left;
    margin-top: -4px;
}

img.attachment-img {
    // margin: 5px;
    // display: block;
    // max-width: 250px;
}

span.event-text {
    display: block;
    img.attachment-img {
        margin: 5px;
        display: block;
        max-width: none;
    }
}

#logo {
    margin-left: 1px;
    padding: 10px 20px;
    font-size: 200%;
}

div.date-box {
    display: inline-block;
    height: 22px;
    width: 22px;
    margin: 0 5px;
    border: 1px solid #000;
    background: #fff;
    @include border-radius(2px);
    text-align: center;
    vertical-align: middle;
    span {
        display: block;
        font-weight: bold;
    }
    .month {
        background: #444;
        color: #fff;
        font-size: 10px;
        line-height: 10px;
        text-transform: uppercase;
    }
    .day {
        display: block;
        font-size: 12px;
        line-height: 12px;
    }
}

.list-view div.date-box {
    height: 32px;
    width: 32px;
    margin: 5px 5px 5px 5px;
    border: 2px solid #999;
    display: block;
    float: left;
    @include border-radius(4px);
}

.list-view div.date-box {
    background: none;
    .month {
        background: #999;
        font-size: 10px;
        line-height: 11px;
        border-bottom: 1px solid #999;
    }
    .day {
        font-size: 12px;
        line-height: 20px;
        /* @theme color: lighter_link */
    }
    &.p-3 {
        border-color: #f25050;
    }
    &.p-2 {
        border-color: #f8ab50;
    }
    &.p-1 {
        border-color: $darkBlue;
        /* @theme border-color: lighter_link */
    }
    &.p-3 .month {
        background: #f25050;
        border-color: #f25050;
    }
    &.p-2 .month {
        background: #f8ab50;
        border-color: #f8ab50;
    }
    &.p-1 .month {
        background: $darkBlue;
        border-color: $darkBlue;
        /* @theme background: lighter_link */
        /* @theme border-color: lighter_link */
        /* @theme color: content */
    }
}

/*
yii flash box
*/

div {
    &.flash-error, &.flash-notice, &.flash-success {
        margin-bottom: 0;
        padding: .8em;
        border: 2px solid #F5F5F5;
    }
    &.flash-error {
        background: #fbe3e4;
        color: #8a1f11;
        border: 2px solid #fbc2c4;
    }
}

ul.flash-error {
    background: #fbe3e4;
    color: #8a1f11;
    border: 2px solid #fbc2c4;
}

div {
    &.flash-loading, &.flash-notice {
        background: #fff6bf;
        color: #514721;
        border: 2px solid #ffd324;
    }
    &.flash-success {
        background: #e6efc2;
        color: #264409;
        border: 2px solid #c6d880;
    }
    &.flash-tip {
        background: $babyBlue;
        color: $nearBlack;
        border: 2px solid $darkBabyBlue;
    }
    &.flash-error a {
        color: #8a1f11;
    }
    &.flash-notice a {
        color: #514721;
    }
    &.flash-success a {
        color: #264409;
    }
    &.search-form {
        margin-left: 0px;
        margin-right: 0px;
        padding: 10px;
        background: #eee;
        div.wide.form textarea {
            width: 420px;
        }
    }
    &.contact-lists td.contact-count {
        /*background: url(../images/contact-icon.png) 5px center no-repeat;*/
        /*padding-left: 24px;*/
    }
}

/*div.contact-lists th {
        padding-left: 8px !important;
        text-align: left !important;
}
div.contact-lists th.contact-count {
        width: 100px;
}*/

#lists-grid tr.bold td {
    font-weight: bold;
}

#profile {
    float: left;
    width: 300px;
}

div#code-snippet {
    font-family: "Courier New", Courier, monospace;
    background: #f8f8f8;
    border: 1px solid #F5F5F5;
    padding: 5px;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    -o-border-radius: 4px;
}

.yiiLog {
    display: block;
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    width: auto !important;
    overflow-y: scroll;
}

.yiiTranslationList {
    display: block;
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    width: auto !important;
    overflow-y: scroll;
    width: 150px;
    border: 1px solid #000;
    background: #fff;
    overflow-y: auto;
}

.yiiLog {
    tbody {
        width: 100%;
    }
    pre {
        margin: 0;
    }
}

.flowTrace {
    background: #fff;
    position: fixed;
    z-index: 2000;
    bottom: 0;
    left: 0;
    height: 200px;
    width: 500px;
    overflow-y: scroll;
}


dt.yii-t {
    display: inline;
}

body.yii-t dt.yii-t {
    cursor: help;
    background: rgba(255, 0, 0, 0.5);
}

.email-attachment-image {
    display: inline-block;
    height: 30px;
    width: 30px;
}

.email-attachment-text {
    position: relative;
    left: 10px;
    vertical-align: 50%;
}

#media-library-widget-wrapper {
    display: inline-block;
    overflow: hidden;
    /* width: 100%; */
}

#media-library-widget-container {
    overflow: auto;
    height: 100%;
    width: 100%;
}

#widget_MediaBox .ui-resizable-s {
    height: 14px;
}

.media-hover-image {
    height: 64px;
    width: 64px;
    float: left;
}

.media-library-item {
    cursor: pointer;
}

.media-library-showhide {
    cursor: pointer;
    text-decoration: none;
    float: right;
}

.delete-tag {
    color: #06C;
    font-size: 0.7em;
    vertical-align: 15%;
    cursor: pointer;
    &:hover {
        color: #09F;
    }
}

.tag input.x2-new-tag {
    margin: 0;
    padding: 0;
    border: none;
    background: #F0F0F0;
    width: 10px;
}

.overdue {
    color: #E60000;
}

textarea.restrictX {
    max-width: 100%;
}

/***********************************************************************
* tip widget 
***********************************************************************/

.tip-refresh {
    float: right;
    cursor: pointer;
}
.tip-title {
        text-align: center;
        font-weight: bold;
}
.tip {
        text-align: center;
}
#tip-content{
        margin-right:22px;
}
.tip-refresh {
        opacity: 0.4;
}
.tip-refresh:hover {
        opacity: 0.6;
}

/***********************************************************************
Error Handling
***********************************************************************/

input.error {
    background: #FEE;
    border-color: #C00 !important;
}

span.error-message, div.error-message {
    color: red;
}

/*
Error message container
*/

.error-summary-container {
    clear: both;
    background: #FEE;
    border: 2px solid #C00;
    font-size: 0.9em;
    padding: 5px;
    margin-bottom: 1px;
    margin-top: 5px;
    p {
        margin: 0;
        padding: 5px;
    }
    ul {
        margin: 0;
        padding: 0 0 0 20px;
    }
}

/***********************************************************************
Credentials storage manager
***********************************************************************/

.credentials-storage {
    padding: 10px;
    
    .credentials-view {
        border-radius: 4px;
        border: 1px solid #e0e0e0;
        padding: 10px;
        margin-bottom: 10px;
    }
    .info-display {
        display: inline-block;
    }
    .default-state {
        display: inline-block;
        font-size: 12px;
        padding: 4px;
        -moz-border-radius: 7px;
        -webkit-border-radius: 8px;
        border-radius: 8px;
        background-color: white;
        border: 1px solid #e0e0e0;
        
        &.default-state-set {
            border-color: #C6D880;
            background-color: #E6EFC2;
        }
        * {
            display: inline-block;
            vertical-align: middle;
        }
        .default-apply {
            display: none;
        }
    }
    .credentials-view .credentials-delete {
        float: right;
        display: block;
        clear: left;
        vertical-align: top;
        margin-top: 0;
    }

    .unencrypted {
        color: $deleteRed;
    }
    .encrypted {
        color: $highlightGreen;
    }

}

.default-display {
    padding-top: 3px;
}

p {
    &.fieldhelp-above {
        color: #666;
        font-size: 12px;
        margin: -0.2px 0 0.8em;
        width: 193px;
    }
    &.fieldhelp-thin-small {
        color: #666;
        font-size: 10px;
        margin-bottom: 0;
        width: 193px;
    }
    &.fieldhelp {
        color: #666;
        font-size: 12px;
        margin: -0.3em 0 0.8em;
        width: 193px;
        &.half {
            display: inline-block;
            width: 79px;
            margin: 0;
        }
    }
}

span.x2-down-arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid dimGray;
    width: 0px !important;
    height: 0px !important;
}
